<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ES6 扩展解构</title>
</head>
<body>
<script>
  let person = {
    name: "abc",
    gender: "男",
    age: 18
  };

  let {name, ...other} = person
  console.log(name);
  console.log(other);

  let array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];

  let [a, b, c, ...numbers] = array;
  console.log(a);
  console.log(b);
  console.log(c);
  console.log(numbers);

</script>
</body>
</html>